
#include <LoadArea.h>
#include <World.h>
#include <Area.h>
#include <Camera.h>
#include <ExitMenu.h>

LoadArea::LoadArea(World* worldptr, Area* newArea)
:Command(CommandType::BLOCKING)
,world(worldptr)
,area(newArea)
{}

LoadArea::~LoadArea() 
{}

truth LoadArea::Execute()
{
	if(area)
	{
		world->SetArea(area);
		world->InitCurrentArea();
		Global::SetDebugMode(0);
		complete = 1;
		world->SetMainMenu( 0 );
		return complete;
	}
	return 1;
}